package com.sanweibook.jhook.biz.sys.impl;

import com.sanweibook.jhook.biz.CrudService;
import com.sanweibook.jhook.biz.sys.SysRoleMenuService;
import com.sanweibook.jhook.dal.dao.sys.SysRoleMenuDao;
import com.sanweibook.jhook.dal.model.sys.SysRoleMenu;
import com.sanweibook.jhook.dal.page.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* Created by twg on 17/3/16.
*/
@Service
public class SysRoleMenuServiceImpl extends CrudService<SysRoleMenuDao,SysRoleMenu> implements SysRoleMenuService {

    @Override
    public void delete(SysRoleMenu sysRoleMenu) {
        delete(sysRoleMenu,"sysRoleMenu:*");
    }

    @Override
    public void deleteById(Long id) {
        deleteById(id,"sysRoleMenu:*");
    }

    @Override
    public void deletedByIds(List<Long> ids) {
        deleteByIds(ids,"sysRoleMenu:*");
    }

    @Override
    public SysRoleMenu get(SysRoleMenu sysRoleMenu) {
        return get(sysRoleMenu,"sysRoleMenu:get");
    }

    @Override
    public SysRoleMenu getById(Long id) {
        return getById(id,"sysRoleMenu:getbyid");
    }

    @Override
    public void save(SysRoleMenu sysRoleMenu) {
        insert(sysRoleMenu,"sysRoleMenu:*");
    }

    @Override
    public void batchSave(List<SysRoleMenu> sysRoleMenu) {
        batchInsert(sysRoleMenu,"sysRoleMenu:*");
    }

    @Override
    public void update(SysRoleMenu sysRoleMenu) {
        update(sysRoleMenu,"sysRoleMenu:*");
    }

    @Override
    public int queryCount(SysRoleMenu sysRoleMenu) {
        return queryCount(sysRoleMenu,"sysRoleMenu:querycount");
    }

    @Override
    public List<SysRoleMenu> queryAll(SysRoleMenu sysRoleMenu) {
        return queryAll(sysRoleMenu,"sysRoleMenu:queryall");
    }

    @Override
    public List<SysRoleMenu> queryByIds(List<Long> ids) {
        return queryByIds(ids,"sysRoleMenu:querybyids");
    }

    @Override
    public Page<SysRoleMenu> queryByPages(SysRoleMenu sysRoleMenu) {
        return queryByPage(sysRoleMenu);
    }
}
